<?php
include('config.php')
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
	
	<?php 
        include'head.php';
        ?>
	
</head>

<body>

<div id="global">

	

<?php	include('menu.php'); ?>

	<div id="centre">

		<div id="principal">
			
			<h3>Liste des parcours</h3>
                        
			
			<div id="map-canvas">
           
            
       
<table
    <tr>
        <th>Createur</th>
    	<th>Nom</th>
    	<th>Date de creation</th>
    	
    </tr>
<?php

 if(isset($_SESSION['userid'])){

	$userId = $_SESSION['userid'];
            $req = mysql_query('select id_ride, name, creator, creation_date from ride ');   
 }
//On recupere les identifiants, les pseudos et les emails des utilisateurs

while($dnn = mysql_fetch_array($req))
{
?>
	<tr>
    	<td><?php 
        $dn = mysql_query('select username from users where id="'.$dnn['creator'].'"');
        if(mysql_num_rows($dn)>0)
	{
		$d = mysql_fetch_array($dn);
        echo htmlentities($d['username']);
        }        
        
        ?></td>
    	<td><a href="affiche_parcours.php?id=<?php echo $dnn['id_ride']; ?>"><?php echo htmlentities($dnn['name'], ENT_QUOTES, 'UTF-8'); ?></a></td>
    	<td ><?php echo htmlentities($dnn['creation_date'], ENT_QUOTES, 'UTF-8'); ?></td>
    </tr>
<?php
}
?>
</table>      
                                      
                            
                            
			</div>
				<br />
			
		</div><!-- #principal -->
                
                
                <div id="secondaire">
		<?php include 'col_gauche.php'; ?>
           
		</div><!-- #secondaire -->


                

	</div><!-- #centre -->

</div><!-- #global -->


<div class="foot"><a href="<?php echo $url_home; ?>">Retour &agrave; l'accueil</a></div>
</body>
</html>


